//路由文件
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'/recomment/rtstyle'
  },
  {
    path: '/comment',
    name: 'comment',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Comment.vue')
  },
  {
    path: '/recomment',
    name: 'Recomment',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Recomment.vue'),
    children:[
      {
        path: '/recomment/rtstyle',
        name: 'Gexin',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import(/* webpackChunkName: "about" */ '../views/Recomment/Gexin.vue')
      },
      {
        path: '/recomment/songlist',
        name: 'SongList',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import(/* webpackChunkName: "about" */ '../views/Recomment/SongList.vue')
      },
      {
        path: '/recomment/zhubo',
        name: 'Zhubo',
        component: () => import(/* webpackChunkName: "about" */ '../views/Recomment/Zhubo.vue')
      },
      {
        path: '/recomment/phang',
        name: 'Phang',
        component: () => import(/* webpackChunkName: "about" */ '../views/Recomment/Phang.vue')
      },
      {
        path: '/recomment/singer',
        name: 'Singer',
        component: () => import(/* webpackChunkName: "about" */ '../views/Recomment/Singer.vue')
      },
      {
        path: '/recomment/newmusic',
        name: 'Newmusic',
        component: () => import(/* webpackChunkName: "about" */ '../views/Recomment/Newmusic.vue')
      },
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
